BIN=processbar.exe
SRC=$(wildcard *.c)
OBJ=$(SRC:.c=.o)
CC=gcc
FLAGS=-c
LFLAGS=-o
RM=rm -f

$(BIN):$(OBJ)
	@$(CC) $^ $(LFLAGS) $(BIN)
	@echo "linking...$^...to...$@"
%.o:%.c
	@$(CC) $(FLAGS) $<
	@echo "compeling...$<...to...$@"

.PHONY:clean
clean:
	@$(RM) $(OBJ) $(BIN)
	@echo "removing...$(OBJ)、$(BIN)"

.PHONY:test
test:
	@echo "$(BIN)"
	@echo "$(OBJ)"
	@echo "$(SRC)"
	@echo "$(CC)"
	@echo "$(FLAGS)"
	@echo "$(LFLAGS)"
	@echo "$(RM)"
